home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIIDNService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  159 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIIDNService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIIDNService_h__
  6. #define __gen_nsIIDNService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIIDNService */
  19. #define NS_IIDNSERVICE_IID_STR "7b67747e-a8c4-4832-80c7-39ebb0c11f94"
  20.  
  21. #define NS_IIDNSERVICE_IID \
  22.   {0x7b67747e, 0xa8c4, 0x4832, \
  23.     { 0x80, 0xc7, 0x39, 0xeb, 0xb0, 0xc1, 0x1f, 0x94 }}
  24.  
  25. /**
  26.  * nsIIDNService interface.
  27.  *
  28.  * IDN (Internationalized Domain Name) support. Provides facilities
  29.  * for manipulating IDN hostnames according to the specification set
  30.  * forth by the IETF.
  31.  *
  32.  * IDN effort:
  33.  * http://www.ietf.org/html.characters/idn-charter.html
  34.  * http://www.i-dns.net
  35.  *
  36.  * IDNA specification:
  37.  * http://search.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt
  38.  */
  39. class NS_NO_VTABLE nsIIDNService : public nsISupports {
  40.  public: 
  41.  
  42.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IIDNSERVICE_IID)
  43.  
  44.   /**
  45.      * Prepares the input hostname according to IDNA ToASCII operation,
  46.      * the input hostname is assumed to be UTF8-encoded.
  47.      *
  48.      * The current input is string, but this may change pending Bug 84186.
  49.      */
  50.   /* ACString convertUTF8toACE (in AUTF8String input); */
  51.   NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval) = 0;
  52.  
  53.   /**
  54.      * This is the ToUnicode operation as specified in the IDNA proposal,
  55.      * with an additional step to encode the result in UTF-8.
  56.      * It takes an ACE-encoded hostname and performs ToUnicode to it, then
  57.      * encodes the resulting string into UTF8.
  58.      */
  59.   /* AUTF8String convertACEtoUTF8 (in ACString input); */
  60.   NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval) = 0;
  61.  
  62.   /**
  63.      * Checks if the input string is ACE encoded or not.
  64.      */
  65.   /* boolean isACE (in ACString input); */
  66.   NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval) = 0;
  67.  
  68.   /**
  69.      * Performs the unicode normalization needed for hostnames in IDN,
  70.      * for callers that want early normalization.
  71.      */
  72.   /* AUTF8String normalize (in AUTF8String input); */
  73.   NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval) = 0;
  74.  
  75. };
  76.  
  77. /* Use this macro when declaring classes that implement this interface. */
  78. #define NS_DECL_NSIIDNSERVICE \
  79.   NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval); \
  80.   NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval); \
  81.   NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval); \
  82.   NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval); 
  83.  
  84. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  85. #define NS_FORWARD_NSIIDNSERVICE(_to) \
  86.   NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval) { return _to ConvertUTF8toACE(input, _retval); } \
  87.   NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval) { return _to ConvertACEtoUTF8(input, _retval); } \
  88.   NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval) { return _to IsACE(input, _retval); } \
  89.   NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval) { return _to Normalize(input, _retval); } 
  90.  
  91. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  92. #define NS_FORWARD_SAFE_NSIIDNSERVICE(_to) \
  93.   NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertUTF8toACE(input, _retval); } \
  94.   NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertACEtoUTF8(input, _retval); } \
  95.   NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsACE(input, _retval); } \
  96.   NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Normalize(input, _retval); } 
  97.  
  98. #if 0
  99. /* Use the code below as a template for the implementation class for this interface. */
  100.  
  101. /* Header file */
  102. class nsIDNService : public nsIIDNService
  103. {
  104. public:
  105.   NS_DECL_ISUPPORTS
  106.   NS_DECL_NSIIDNSERVICE
  107.  
  108.   nsIDNService();
  109.  
  110. private:
  111.   ~nsIDNService();
  112.  
  113. protected:
  114.   /* additional members */
  115. };
  116.  
  117. /* Implementation file */
  118. NS_IMPL_ISUPPORTS1(nsIDNService, nsIIDNService)
  119.  
  120. nsIDNService::nsIDNService()
  121. {
  122.   /* member initializers and constructor code */
  123. }
  124.  
  125. nsIDNService::~nsIDNService()
  126. {
  127.   /* destructor code */
  128. }
  129.  
  130. /* ACString convertUTF8toACE (in AUTF8String input); */
  131. NS_IMETHODIMP nsIDNService::ConvertUTF8toACE(const nsACString & input, nsACString & _retval)
  132. {
  133.     return NS_ERROR_NOT_IMPLEMENTED;
  134. }
  135.  
  136. /* AUTF8String convertACEtoUTF8 (in ACString input); */
  137. NS_IMETHODIMP nsIDNService::ConvertACEtoUTF8(const nsACString & input, nsACString & _retval)
  138. {
  139.     return NS_ERROR_NOT_IMPLEMENTED;
  140. }
  141.  
  142. /* boolean isACE (in ACString input); */
  143. NS_IMETHODIMP nsIDNService::IsACE(const nsACString & input, PRBool *_retval)
  144. {
  145.     return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147.  
  148. /* AUTF8String normalize (in AUTF8String input); */
  149. NS_IMETHODIMP nsIDNService::Normalize(const nsACString & input, nsACString & _retval)
  150. {
  151.     return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153.  
  154. /* End of implementation class template. */
  155. #endif
  156.  
  157.  
  158. #endif /* __gen_nsIIDNService_h__ */
  159.